﻿Friend Class MySettings
    Public Class KeyStringConverter
        Implements IValueConverter

        Public Function Convert(value As Object, targetType As System.Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
            Return [Enum].GetName(GetType(System.Windows.Forms.Keys), value)
        End Function

        Public Function ConvertBack(value As Object, targetType As System.Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
            Return [Enum].Parse(GetType(System.Windows.Forms.Keys), value)
        End Function
    End Class

    Private Shared ReadOnly keyList As List(Of String) = [Enum].GetNames(GetType(System.Windows.Forms.Keys)).ToList
    Public Shared ReadOnly Property Keys As List(Of String)
        Get
            Return keyList
        End Get
    End Property
End Class
